package com.nipun.neural.objects.neurons;

public class SinusoidalNeuron extends BaseNeuronImpl {

	public SinusoidalNeuron(String label) {
		super(label);
	}

	@Override
	public double actFunction(double input) {
		return Math.sin(Math.PI*input);
	}

	@Override
	public void fire(double input) {
		setActivation(actFunction(input)+getBias());
	}

	@Override
	public double getDerivative() {
		return Math.cos(getActivation());
	}

}
